package com.xw.singleton;

import com.sun.deploy.util.StringUtils;

/**
 * @author: xw
 * @create: 2022/9/13 18:00
 * @description: double check lock
 */
public class Code03_SingletonDCL {
    private static volatile Code03_SingletonDCL INSTANCE;

    private Code03_SingletonDCL (){}

    public static Code03_SingletonDCL getInstance(){
        if(null == INSTANCE){
            synchronized(Code03_SingletonDCL.class){
                if(null == INSTANCE){
                    INSTANCE = new Code03_SingletonDCL();
                }
            }
        }
        return INSTANCE;
    }

}
